
var roomName = null;
var roomLocation = null;
var Number = null;
var Description =null;
var roomStatus = null;
var addBtn = null;
var backBtn = null;


$(function(){
	roomName = $("#name");
	roomLocation = $("#location");
	Number = $("#number");
	Description = $("#description");
	roomStatus = $("#status");
	addBtn = $("#add");
	backBtn = $("#back");
	//初始化的时候，要把所有的提示信息变为：* 以提示必填项，更灵活，不要写在页面上
	roomName.next().html("*");
	roomLocation.next().html("*");
	Number.next().html("*")
	Description.next().html("*");
	roomStatus.next().html("*");









	addBtn.bind("click",function(){

		if (confirm("是否确认提交数据")) {
			$("#roomForm").submit();
		}


	});

	backBtn.on("click",function(){
		window.location.href = "/room/list.html";
	});
});